Load Balancing

Load balancing provides a single interface to distribute the traffic across a group of VoiceCheck servers. Load balancing is not the same as failover, since failover only has one active server at any given time.

How it Works

NGINX is an open source web server that provides load balancer services among other features such as reverse proxy that support VoiceCheck in a load balanced environment. Load balancing is supported via HTTP or HTTPS.

A typical load balanced installation would look like this.

Load balancing can be used for HTTP or HTTP connections.

NGNIX supports several load balancing methods. The method is specified in the NGINX config file.

  • Round Robin: Requests are distributed equally across the servers, with server weights taken into consideration. This is the default method, so it is used if no method is specified.
  • Least Connections: A request is sent to the server with the least number of active connections, with server weights taken into considerations.
  • IP Hash: This method is used to determine what server should be selected for the next request. In this type of case, either the first three octets of the IPv4 address or the whole IPv6 address are used to calculate the hash value.
  • Generic Hash: The server to which a request is sent is determined from a user-defined key which can be a string, text, variable or a combination. For example, the key may be a paired source IP address and port, or key may be a UR.
  • Least Time: For every request, NGINX selects the server with the lowest average latency and the lowest number of active connections, where the lowest average latency is calculated based on which of the following parameters to the least_time directive is included.

When working with NGINX, the following server start/stop commands may be used:

  • start nginx - nginx server start
  • nginx -s stop - fast shutdown
  • nginx -s quit - graceful shutdown
  • nginx -s reload - changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
  • nginx -s reopen - reopening log files

Tips for Working in Load Balanced Environments

By design, some features in a load balanced environment are limited to the primary node.

  • Only the primary node can automatically execute jobs from the Schedules tab.
  • Start/stop export requests can only be executed from the primary node. The user must be logged into the primary node to perform these actions.
  • The Export Settings under System Configuration can only be changed from the primary node.

If a node goes down, users with requests sent to that node may be directed to log in again and may hvae a valid license not found messages. If this happens, Android users should log in again. Talkman users should releoad the task package. The users are then reconnected to an active node.